<!DOCTYPE html>
<html>
#{include file="header.html"}#
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
  <div class="row">
    <div class="col-sm-12">
      <div class="ibox float-e-margins">
        <div class="ibox-title">
          <h5>字典修改</h5>
          <div class="ibox-tools">
            <button type="button" class="btn btn-xs btn-primary btn-back-reply"><i class="fa fa-reply"></i> 返回</button>
          </div>
        </div>
        <div class="ibox-content">
          <form class="form-horizontal" method="post" action="#{$smarty.const.ACT}#/crm/CstDict/cst_dict_modify/">
			  	<input type="hidden" name="dict_id" value="#{$one.dict_id}#">
            <div class="form-group">
              <label class="col-sm-2 control-label">名称</label>
              <div class="col-sm-8">
                <input name="name" class="form-control" type="text" value="#{$one.name}#" required/>
                <span class="help-block m-b-none"></span> </div>
            </div>
			  <div class="form-group text-left">
				   <label class="col-sm-2 control-label">分类</label>
				  <div class="col-sm-8">
                <select data-placeholder="选择分类..." name="typetag" class="chosen-select" style="width: 200px;" tabindex="2">
                  <option value="">请选分类字典</option>
							#{foreach from=$typelist key=k item=v}#
					  			<option value="#{$v.typetag}#" hassubinfo="true">#{$v.typename}#</option>
							#{/foreach}#
                </select>
              </div>
			  </div>
            <div class="form-group">
              <label class="col-sm-2 control-label">排序</label>
              <div class="col-sm-8">
                <input name="sort" class="form-control" type="text" value="#{$one.sort}#" required/>
                <span class="help-block m-b-none"></span> </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label">启用</label>
              <div class="col-sm-8">
                <div class="checkbox i-checks">
                  <input type="checkbox" name="visible" value="1" #{if $one.visible eq '1'}# checked #{/if}#/>
                </div>
              </div>
            </div>
            <div class="form-group">
              <div class="col-sm-offset-2 col-sm-8">
                <button class="btn  btn-w-m btn-info" type="submit">保存数据</button>
              </div>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>
<!-- 自定义js --> 
<script src="#{$smarty.const.APP}#/View/template/js/content.js?v=1.0.0"></script> 
<script>
$(document).ready(function () {
	$('.i-checks').iCheck({
		checkboxClass: 'icheckbox_square-green',
		radioClass: 'iradio_square-green',
	});
	$('.chosen-select').chosen({search_contains: true});
	 $(".chosen-select").val("#{$one.typetag}#").trigger("chosen:updated");
});
</script>
</body>
</html>